package com.team.mp.mapper.entity;

import java.util.Date;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import java.io.Serializable;

/**
 * 标签表(Label)表实体类
 *
 * @author makejava
 * @since 2023-03-27 11:39:16
 */
@Data
@TableName("t_label")
public class Label {
    //编号，主键
    @TableId(type = IdType.AUTO)
    private Integer id;
    //标签名称
    private String name;
    //创建人
    private String createPeople;
    //最后修改时间
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date updateTime;
    //状态 1.开启 0.关闭
    private Integer status;

    public void init(String people) {
        this.status = 1;
        this.createPeople = people;
        this.updateTime = new Date();
    }

}

